/******************************************************************************
 * Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved.
 * gala-gopher licensed under the Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *     http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
 * PURPOSE.
 * See the Mulan PSL v2 for more details.
 * Author: wo_cow
 * Create: 2022-06-23
 * Description: tc_loader header file
 ******************************************************************************/
#ifndef __TC_LOADER_H__
#define __TC_LOADER_H__

#define NAME_MAX 255
#define MAX_CMD_LEN (256 + NAME_MAX)
#define MAX_NAME_LEN 64

#define TC_OK       0
#define TC_ERR      (-1)

enum tc_type_e {
    TC_TYPE_INGRESS = 0,
    TC_TYPE_EGRESS,
};

void load_tc_bpf(char netcard_list[], const char *tc_bpf_o, enum tc_type_e tc_type);
void offload_tc_bpf(enum tc_type_e tc_type);

#endif
